package com.sun.showcase.biz.basic.service;

import com.sun.showcase.biz.basic.service.fallback.BasicFeignFallbackService;
import com.sun.showcase.client.domain.basic.UserInfo;
import com.sun.showcase.pojo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "${service.basic.name}",path = "${service.basic.path}",fallback = BasicFeignFallbackService.class)
public interface BasicFeignService {
    @RequestMapping(value="/basic/userInfo/get",method = RequestMethod.GET)
    public UserInfo get(@RequestParam("userId")String userId);
    @RequestMapping(value="/basic/userInfo/updateBalance",method = RequestMethod.GET)
    public Result<Long> updateBalance(@RequestParam("userId")String userId , @RequestParam("balance")Double balance);
    @RequestMapping(value="/basic/baseseCodingRule/getNextCode",method = RequestMethod.GET)
    public String getNextCodeById(Long id);
}
